package com.cyzy.controller;

import com.cyzy.domain.dto.ResponseData;
import com.cyzy.domain.query.TCultivationQuery;
import com.cyzy.service.CultivationService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
public class CultivationController {
    @Autowired
    private CultivationService cultivationService;
    //    驱虫服务
    @PostMapping("/pest")
    public ResponseData pest(@RequestBody TCultivationQuery tCultivationQuery){
        System.out.println("1111111111");
        System.out.println(tCultivationQuery.getUid());
        return cultivationService.pest(tCultivationQuery);
    }

}
